#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include "mifare_classic.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_openButton_clicked(bool);
    void poll_target();
    void on_readButton_clicked();
    void on_writeButton_clicked();
    void update_accessbits();

private:
    Ui::Widget *ui;
    nfc_context* context;
    nfc_device* reader;
    QTimer* timer;
    nfc_modulation nm;
    nfc_target tag;
};
#endif // WIDGET_H
